﻿using System.ComponentModel.Composition;
using iStudio.Structure.Command;

namespace iStudio.Module.Basic
{
    /// <summary>
    /// Interaction logic for Basic.xaml
    /// </summary>
    [Export(typeof(Structure.Engine.Module))]
    public class BasicModule : Structure.Engine.Module
    {
        public BasicModule()
        {
            //
            // We created a single command and hooked it into main menu Functions / Basic
            // And Basic of the TrackEditor context menu
            //

            AddCommand ("Basic", "Functions/Basic");
            AddCommand ("Basic", "Functions/Basic/Most Basic", ModuleCommandType.FromCommandId ("TrackEditorSelect"));

            SetupModuleWindow (new BasicWindow (this));
        }

        protected override void OnExecutedCommand(ModuleCommand command)
        {
            switch (command.Name)
            {
                case "Basic":
                    OpenModuleWindow ();
                    break;
            }
        }
    }
}
